//
// GPSMapEdit
// (c) Konstantin Galichsky (kg@geopainting.com), 2002-2005
//
// 'Map properties' dialog, 'Bounds' tab.
//

# include "StdAfx.h"
# include "Resource.h"
# include "MapProperties.h"
# include "Map.h"
# include "PrintUnits.h"

INT_PTR CALLBACK _MapRectBounds (HWND _hWnd, UINT _uMsg, WPARAM _wParam, LPARAM _lParam) {
	switch (_uMsg) {
		case WM_INITDIALOG: {
			CCritSec::CLock lock (g_cs);

			char strBuf [64];

			// Fill info about the map rectangle.
			PrintLon (strBuf, g_map.rectBound.x0);
			::SetDlgItemText (_hWnd, IDC_LEFT, strBuf);
			PrintLon (strBuf, g_map.rectBound.x1);
			::SetDlgItemText (_hWnd, IDC_RIGHT, strBuf);
			PrintLat (strBuf, g_map.rectBound.y0);
			::SetDlgItemText (_hWnd, IDC_BOTTOM, strBuf);
			PrintLat (strBuf, g_map.rectBound.y1);
			::SetDlgItemText (_hWnd, IDC_TOP, strBuf);

			return FALSE;
		}
	}

	return FALSE;
}
